import { httpRequest } from 'fssc-template'
const request = {
    ...httpRequest.service,
    
    get(url, params,other) {
        console.log(params)
        return httpRequest.get(url, params && params.params, other)
    },
    post(url, params) {
        return httpRequest.post(url, params)
    },
    put(url, params) {
        return httpRequest.put(url, params)
    },
    delete(url, params) {
        return httpRequest.delete(url, params)
    },
    patch(url, params,other) {
        return httpRequest.patch(url, params, other)
    },
    download({ url, data, method = 'get' }) {
        let requestData = { method,  responseType: 'blob' }
        method == 'get' ? requestData.params = data : requestData.data = data
        return httpRequest.download(url, requestData);
    }
    
    
}

export default request